package com.idheima.Set.Hashcode;

public class Test {
    public static void main(String[] args) {
        //了解哈希值
        //1.同一个对象的哈希值是一致的
        String s1 = new String("abc");
        System.out.println(s1.hashCode());
        System.out.println(s1.hashCode());
        System.out.println(s1.hashCode());
        System.out.println("=================");
        //2.不同对象，哈希值是不一致的，也有可能一样
        String s2 = new String("abc");
        System.out.println(s2.hashCode());
        String s3 = new String("acD");
        System.out.println(s3.hashCode());
    }
}
